package cn.Service;

import cn.entity.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

public interface AdminService {
    Admin getAdmin(Admin admin);

    int updateAdmin(Admin admin);

    List<User> userAlllist();

    List<User> selectUserBywz(User user);

    List<Comment> selectCommentAll();

    List<Order> selectOrderAll();

    List<Order> selectOrderBywz(Order order);

    Order selectOrderByoid(int oid);

    List<OrderItem> selectListOrder_itemByorder_id(int order_id);

    void updateOrder_itemSend_countByid(int send_count,String id);

    void updateOrderByoid(String ostate,int oid);




    void updateOrder_itemByOrder_id(int send_count,int order_id);


    void UpdateOrder(int oid,String ostate);

    List<OrderDetails> selectOrderDetails(int oid);

    Order selectOrderByonum(String oum);

    List<ShowPingLun> selectShowPingLunBypid(int pid);





    public List<Product> getProduct();//查看所有商品

    public List<Product> getselectProduct(Integer pid);//根据编号查询

    public List<Product> getselectProductByname(String pname);//根据商品名称查询

    public List<Product> getselectProductBypmaterial(String pmaterial);//根据素材查询


    public int updateProduct(Product product);

    public int deleteProduct(Integer pid);

    public int addProduct(Product product);

    public List<Product_bill> getProduct_bill();

    public int updateProduct_bill(Product_bill product_bill);

    public int addProduct_bill(Product_bill product_bill);

    public int deleteProduct_bill(String id);


    public Product getProductById(Integer pid);

    public List<OrderItem> getOrder_itemByPid(Integer pid);

    public List<Order> getOrderByoid(Integer oid);

    void updateProductNumByPid(int num,int pid);




    Category selectCategoryCnameByCname(String cname);

    void insertCategory(String cname);

    List<Category> selecttb_categoryAll();

    List<Product> getProductListByCid(int cid);

    void deleteCategoryBycid(int cid);





    public int deleteComment(int pid);


    void updateUserStop(int stop,int uid);
    List<Product> selectProductByNum(int num);


    List<Product> selectProductByCid(String cname);

}
